# Test Plan for TP-Link Omada Touch Kiosk Refactored Version

## Overview
This test plan verifies that all the fixes implemented for the refactored version are working correctly, specifically addressing the issue where "menu e galrias nao estao abrindo na versao refatorada" (menu and galleries are not opening in the refactored version).

## Test Environment
- Local server running on port 8000
- Browser: Latest Chrome or Edge
- Device: Touch screen or desktop with mouse/keyboard

## Test Cases

### 1. Menu Functionality
**Objective**: Verify that the menu opens and closes correctly

**Steps**:
1. Navigate to http://localhost:8000/refactored/
2. Click the menu button at the bottom of the screen
3. Verify that the side menu opens
4. Click the close button (×) in the menu
5. Verify that the menu closes
6. Press the 'M' key on the keyboard
7. Verify that the menu opens
8. Press the 'M' key again
9. Verify that the menu closes

**Expected Results**:
- Menu opens when clicking the menu button or pressing 'M'
- Menu closes when clicking the close button or pressing 'M' again
- No JavaScript errors in the console

### 2. Family Selection
**Objective**: Verify that family selection works correctly

**Steps**:
1. Open the menu
2. Click on any family card (e.g., "Switches")
3. Verify that the family products screen is displayed
4. Verify that products for the selected family are shown
5. Click the back button
6. Verify that you return to the family selector screen

**Expected Results**:
- Family products screen displays correctly
- Products for the selected family are shown
- Back button navigates correctly to the family selector

### 3. Product Information Panel
**Objective**: Verify that product information panels open correctly

**Steps**:
1. Open the menu
2. Select a family
3. Click on any product card
4. Verify that the information panel opens
5. Verify that product information is displayed
6. Click the close button (×) in the panel
7. Verify that the panel closes

**Expected Results**:
- Information panel opens when clicking a product card
- Product information is displayed correctly
- Panel closes when clicking the close button

### 4. Gallery Navigation
**Objective**: Verify that product galleries work correctly

**Steps**:
1. Open a product information panel
2. Verify that the main product image is displayed
3. Click on different thumbnail images
4. Verify that the main image updates
5. Use keyboard navigation (arrow keys) to navigate between products
6. Press Enter to open the product information panel

**Expected Results**:
- Main image updates when clicking thumbnails
- Keyboard navigation works correctly
- Enter key opens product information panel

### 5. Touch Interactions
**Objective**: Verify that touch interactions work correctly

**Steps**:
1. On a touch device, open the menu
2. Touch a family card
3. Verify that the family products screen is displayed
4. Touch a product card
5. Verify that the information panel opens
6. Touch the close button
7. Verify that the panel closes

**Expected Results**:
- All touch interactions work correctly
- No JavaScript errors in the console

### 6. Keyboard Navigation
**Objective**: Verify that keyboard navigation works correctly

**Steps**:
1. Open the menu
2. Use arrow keys to navigate between family cards
3. Press Enter to select a family
4. Use arrow keys to navigate between product cards
5. Press Enter to open product information
6. Press Escape to close the information panel
7. Press Escape again to close the menu

**Expected Results**:
- Arrow keys navigate correctly between cards
- Enter key selects items
- Escape key closes panels and menu

## Automated Testing

### Console Verification
**Objective**: Verify that there are no JavaScript errors

**Steps**:
1. Open browser developer tools
2. Navigate through all screens
3. Perform all interactions
4. Check console for errors

**Expected Results**:
- No JavaScript errors in the console
- All console.log messages are appropriate

## Success Criteria
All test cases must pass with no errors or unexpected behavior. The application should:
- Open and close the menu correctly
- Display family selection screen
- Show products for each family
- Open product information panels
- Navigate galleries correctly
- Handle touch and keyboard interactions properly
- Show no JavaScript errors in the console

## Rollback Plan
If any issues are found:
1. Revert the specific changes that caused the issue
2. Test again to confirm the rollback fixed the problem
3. Implement an alternative solution
4. Retest all functionality